/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50714
 Source Host           : localhost
 Source Database       : bootdemo

 Target Server Type    : MySQL
 Target Server Version : 50714
 File Encoding         : utf-8

 Date: 07/08/2019 22:09:14 PM
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `t_menus`
-- ----------------------------
DROP TABLE IF EXISTS `t_menus`;
CREATE TABLE `t_menus` (
  `menusid` int(11) NOT NULL AUTO_INCREMENT,
  `fatherid` int(11) DEFAULT NULL,
  `menusname` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `menusurl` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`menusid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `t_menus`
-- ----------------------------
BEGIN;
INSERT INTO `t_menus` VALUES ('1', '0', 'xxx 管理系统', null), ('2', '1', '项目管理', null);
COMMIT;

-- ----------------------------
--  Table structure for `t_roles`
-- ----------------------------
DROP TABLE IF EXISTS `t_roles`;
CREATE TABLE `t_roles` (
  `roleid` int(11) NOT NULL AUTO_INCREMENT,
  `rolename` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`roleid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `t_roles`
-- ----------------------------
BEGIN;
INSERT INTO `t_roles` VALUES ('1', '管理员'), ('2', '项目经理');
COMMIT;

-- ----------------------------
--  Table structure for `t_roles_menus`
-- ----------------------------
DROP TABLE IF EXISTS `t_roles_menus`;
CREATE TABLE `t_roles_menus` (
  `role_id` int(11) NOT NULL,
  `menu_id` int(11) NOT NULL,
  PRIMARY KEY (`role_id`,`menu_id`),
  KEY `FKpoei3lr3lamiowdso1qxj4gt0` (`menu_id`),
  CONSTRAINT `FKlxuyleingxb494wr18l2ix1m` FOREIGN KEY (`role_id`) REFERENCES `t_roles` (`roleid`),
  CONSTRAINT `FKpoei3lr3lamiowdso1qxj4gt0` FOREIGN KEY (`menu_id`) REFERENCES `t_menus` (`menusid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `t_roles_menus`
-- ----------------------------
BEGIN;
INSERT INTO `t_roles_menus` VALUES ('2', '1'), ('2', '2');
COMMIT;

-- ----------------------------
--  Table structure for `t_users`
-- ----------------------------
DROP TABLE IF EXISTS `t_users`;
CREATE TABLE `t_users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `address` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `age` int(11) DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `roles_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK36d2qntj8b8mx7wk0bcovto6b` (`roles_id`),
  CONSTRAINT `FK36d2qntj8b8mx7wk0bcovto6b` FOREIGN KEY (`roles_id`) REFERENCES `t_roles` (`roleid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `t_users`
-- ----------------------------
BEGIN;
INSERT INTO `t_users` VALUES ('1', '北京市海淀', '20', '张三三', null), ('2', '北京市海淀', '21', '张三', null), ('3', '天津', '32', '张三丰', null), ('5', '北京市海淀', '21', '张三', null), ('6', '天津', '42', '张丰', null), ('7', '南京', '40', '张三丰', null), ('8', '天津', '32', '小刚', '1');
COMMIT;

-- ----------------------------
--  Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_age` int(11) DEFAULT NULL,
  `user_name` varchar(255) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `user`
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES ('1', '23', '水电费'), ('2', '33', '收到'), ('3', '44', '担负'), ('4', '55', '担负'), ('5', '12', '丽丽'), ('6', '29', '王丽英'), ('7', '29', '王丽英');
COMMIT;

-- ----------------------------
--  Table structure for `users`
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `userId` int(11) NOT NULL AUTO_INCREMENT,
  `userName` varchar(255) DEFAULT NULL,
  `userAge` int(11) DEFAULT NULL,
  PRIMARY KEY (`userId`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `users`
-- ----------------------------
BEGIN;
INSERT INTO `users` VALUES ('1', '张三', '22'), ('2', '王五', '199'), ('5', '?????', '234'), ('6', '背包花花熊', '23');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
